.node-expanded-view {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* 头部样式 */
.expanded-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.expanded-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.expanded-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.expanded-name {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
}

.node-type-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.expanded-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* 内容区域 */
.expanded-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.expanded-content-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 选择区域样式 */
.selection-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section-icon {
  font-size: 18px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
}

.selection-content {
  min-height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 连接点样式 */
.connection-point {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.connection-point.left {
  margin-left: -10px;
}

.connection-point.right {
  margin-right: -10px;
}

.connection-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.connection-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  opacity: 0.8;
}

.connection-point:hover .connection-dot {
  transform: scale(1.3);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.connection-point:hover .connection-dot::before {
  opacity: 1;
}

/* 拖拽悬停效果 */
.connection-point.drag-over .connection-dot {
  transform: scale(1.5);
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
  animation: pulse-connection 1s infinite;
}

@keyframes pulse-connection {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
  }
  50% {
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.8);
  }
}

/* 已选择项目样式 */
.selected-item {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 2px solid #0ea5e9;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 60px;
}

.selected-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4);
}

.selected-item-info {
  flex: 1;
}

.selected-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #0c4a6e;
  margin-bottom: 4px;
}

.selected-item-description {
  font-size: 12px;
  color: #0369a1;
  margin-bottom: 6px;
  line-height: 1.4;
}

.selected-item-category {
  font-size: 11px;
  color: #0284c7;
  background: rgba(14, 165, 233, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.clear-selection-btn {
  background: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ef4444;
  font-size: 12px;
}

.clear-selection-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

/* 选择占位符样式 */
.selection-placeholder {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 拖拽悬停效果 */
.selection-placeholder[data-drag-over="true"] {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0%, 100% {
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  }
  50% {
    border-color: #34d399;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
  }
}

.placeholder-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.placeholder-text {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.selection-placeholder.selecting .placeholder-text {
  color: #059669;
  font-weight: 600;
}

.selection-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.selection-pulse {
  width: 60px;
  height: 60px;
  border: 3px solid #10b981;
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* 配置区域样式 */
.config-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.config-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.config-input,
.config-textarea {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #374151;
  transition: all 0.2s ease;
}

.config-input:focus,
.config-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.config-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .expanded-header {
    padding: 12px 16px;
  }
  
  .expanded-name {
    font-size: 16px;
  }
  
  .expanded-body {
    padding: 16px;
  }
  
  .selection-section,
  .config-section {
    padding: 12px;
  }
}
